pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let (num, old_base) = {
        let temp : Vec<&str> = num_str.split('(').collect();
        (temp[0], temp[1].trim_end_matches(')').parse::<u32>().unwrap())
    };

    let mut num_decimal = u32::from_str_radix(num, old_base).unwrap();
    
    let mut res : String = String::new();

    while num_decimal > 0 {
        res.push_str(&format!( "{:x}", num_decimal % to_base));
        num_decimal /= to_base;
    }

    res.chars().rev().collect()
}
